import React, { Component } from 'react';

export function Hoc(Comp) {
  return class Hoc extends Component {
    child = () => {
      const { title } = this.props;
      console.log('child', title);
      // fetch('http://59.110.226.77:3000/api/list/hoc?cid=17')
      //   .then((res) => res.json())
      //   .then((data) => console.log(data))
      //   .catch((error) => Promise.reject(error));
    };
    son = () => {
      console.log('son');
    };
    render() {
      return <Comp child={this.child} son={this.son} />;
    }
  };
}
